package com.zzyl.mapper;

import com.zzyl.entity.Reservation;
import com.zzyl.vo.ReservationVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Mapper
public interface ReservationMapper {
    Long selectCancelledReservationCount( Long customerId,
                                         LocalDateTime start,
                                         LocalDateTime end);

    List<Map<String, Object>> countByTime(LocalDateTime start, LocalDateTime end);

    void insertReservation(Reservation reservation);

    List<ReservationVo> selectByPage(Integer status,Long userId);

    Reservation selectById(Long id);

    void cancleReservation(Long id);
}
